<?php
del_multi_message("sent");

$rs_message = get_all_message_page("sent");
?>
<script type="text/javascript" src="<?php echo SITE_JS_URL; ?>/inc_member.js"></script>
<div class="container">
	<div class="content_mb">
        
		<?php include_once 'inc/left.php';?>
		
		<div class="content_mb_r">
        
			<?php include_once 'inc/post_property_top_center.php';?>
				 <div style="margin-left: 20px;">
				<div class="title_mb_r3"><font style="float:left;">[Các thư đã gửi]</font> <font class="right_title">
                 <?php
			   		if($rs_message["page"]>1){

						echo "<a href='".get_link("member")."/".$CONFIG_MEMBER_LINK["sent"]."/".($rs_message["page"]-1)."'><b><< [Mới hơn] </b></a>";
											
						echo "<a href='#'>l</a>&nbsp;";
					
					}
					
					echo "[Các thư đến từ] ".$rs_message["start"]." - <b>".($rs_message["start"]+$rs_message["num_rows"])."</b>";
					

			   		if($rs_message["total"]>1&&$rs_message["page"]!=$rs_message["total"]){
					
						echo "&nbsp;<a href='#'>l</a>";
						echo "<a href='".get_link("member")."/".$CONFIG_MEMBER_LINK["sent"]."/".($rs_message["page"]+1)."'><b> [Cũ hơn] >></b></a>";
					
					}
			   ?>
                </font></div>
				
				<div class="bg_title_inbox">
					<font>[Chọn]:</font>  <a href="javascript:void(0);" onclick="check_all();">[Tất cả]</a><a href="#">|</a>  <a href="javascript:void(0);" onclick="un_check_all();">[Bỏ chọn]</a>  <a href="#">|</a>  <a href="javascript:void(0);" onclick="submit_form();">[Xóa]</a>
				</div>
				<form name="del_check" action="" method="post" id="form_del_check">
				<div class="title_list_inbox">
					<ul>
						<li>
							<div class="boxcheck"><input type="checkbox" name="checkall" id="checkall" value="" /></div>
							<div class="namesend">[Người nhận]</div>
							<div class="title">[Tiêu đề]</div>
							<div class="datetime">[Ngày gửi]</div>
						</li>
					</ul>
				</div>
				
				<div class="list_inbox">
					<ul>
						<?php
							while($value=$db->fetch_array($rs_message["message"])){
							
								$value['senddate'] = get_my_date($value['senddate']);
								
									$user = $value['username'];
									$title = cutString($value['title'],65);
									$value["senddate"] = $value['senddate'];
								
				
						?>

                        <li>
							<div class="boxcheck"><input type="checkbox" name="check[]" id="check" class="check" value="<?php echo $value["mes_id"]; ?>" /></div>
							<div class="namesend"><a href="<?=get_link("member")."/".$CONFIG_MEMBER_LINK["read"]."/".$value["mes_id"]?>" title="<?=$value["username"]?>"><?php echo $user; ?></b></a></div>
							<div class="title"><a href="<?=get_link("member")."/".$CONFIG_MEMBER_LINK["read"]."/".$value["mes_id"]?>" title="<?=htmlentities_utf8($value["title"])?>"><?php echo $title; ?></a></div>
							<div class="datetime"><?php echo $value['senddate']; ?></div>
						</li>
						<?php   } ?>
					</ul>
				</div>
				</form>
                
				<div class="bg_title_inbox">
					<font>Chọn:</font>  <a href="javascript:void(0);" onclick="check_all();">Tất cả</a><a href="#">|</a>  <a href="javascript:void(0);" onclick="un_check_all();">Bỏ chọn</a>  <a href="#">|</a>  <a href="javascript:void(0);" onclick="submit_form();">Xóa</a>
				</div>
				
				
				
			</div>
		</div>
		
	</div>
</div>